package com.nba.dao;

import java.util.List;

import com.nba.bean.Player;
import com.nba.bean.inherit.PlayerInherit;

public interface PlayerDao {
	
	/**查询所有用户
	 * @return
	 */
	List<Player> selectPlayerAll();
	
	/**通过关键字查找（可做分页查询）
	 * @param keyword
	 * @param pageNum
	 * @param pageSize
	 * @return
	 */
	List<PlayerInherit> selectPlayerAll(String keyword , int pageNum , int pageSize);
	
	/**查询球员的总条数
	 * @param keyword
	 * @return
	 */
	int selectPlayerTotal(String keyword);
	
	/**通过id查询
	 * @param playerId
	 * @return
	 */
	Player selectPlayerById(int playerId);
	
	/**通过id删除
	 * @param playerId
	 * @return
	 */
	int delectPlayerById(int playerId);
	
	/**修改球员信息
	 * @param player
	 * @return
	 */
	int updatePlayer(Player player);
	
	/**添加球员
	 * @param player
	 * @return
	 */
	int insertPlayer(Player player);
	
	/**通过球员明查找
	 * @param playerName
	 * @return
	 */
	Player selectPlayerByName(String playerName);
}
